﻿using MvcFlow.Extensions;
using NUnit.Framework;

namespace MvcFlow.Tests.Extensions
{
    [TestFixture]
    public class ConcurrentBookmarkOutputExtensionTests
    {
        [Test]
        public void ValuesShouldBePassedCorrectly()
        {
            var output = new ConcurrentBookmarkOutputExtension();
            
            output.SetBookmarkValue("Test",10);
            output.SetBookmarkValue("Test2","Hello");

            Assert.AreEqual(10,output.GetBookmarkValue("Test"));
            Assert.AreEqual("Hello",output.GetBookmarkValue("Test2"));
        }

        [Test]
        public void MissingValuesShouldReturnNull()
        {
            var output = new ConcurrentBookmarkOutputExtension();

            Assert.IsNull(output.GetBookmarkValue("Test"));
        }
    }
}